
Chapter 16.5. Augmented Reality with NyARToolkit

From:
  Killer Game Programming in Java
  Web Site: http://fivedots.coe.psu.ac.th/~ad/jg


Contact Address:
  Dr. Andrew Davison
  Dept. of Computer Engineering
  Prince of Songkla University
  Hat Yai, Songkhla 90112, Thailand
  E-mail: ad@fivedots.coe.psu.ac.th
  http://fivedots.coe.psu.ac.th/~ad/jg


If you use this code, please mention my name, and include a link to the Web site.

Thanks,
  Andrew

---------------------------------
Example Files:

 * 2 Java files: BoxNyAR.java, NyARBehavior.java

 * a JAR file for NyARToolkit 4.1.1: NyARToolkit.jar 
      - this was generated by me and tested on Windows 7 and XP

 * 2 batch files: compile.bat, run.bat

 * Data/     // holds camera and marker information
                   -- included is a PDF file for the Hiro marker
                      which you can print out


---------------------------------
Installing NyARToolkit

AR applications require several libraries (aside from Java SE):

   * JavaCV   // required for capturing webcam snaps
   * OpenCV   //   :
   * Java 3D
   * NyARToolkit

  JavaCV:  http://code.google.com/p/javacv/
  I downloaded javacv-0.5-bin.zip and installed it in d:\javacv-bin

  OpenCV:  I downloaded v2.4.5 for Windows with pre-compiled binaries:
  from http://opencv.org/downloads.html and installed it in C:\opencv

  Java 3D installers for a variety of platforms can be obtained from 
  https://java3d.java.net/binary-builds.html. 
  I downloaded the 32-bit Windows installer, j3d-1_5_2-windows-i586.exe
  
  NyARToolkit: stored at http://sourceforge.jp/projects/nyartoolkit/
  Download "NyARToolkit for Java - NyARToolkit Core" v4.1.1 as a 
  zipped file called NyARToolkit-4.1.1.zip. 
  Or use the JAR version (NyARToolkit.jar) included with this code.

---------------------------------
Compiling and Testing NyARToolkit

Details can be found in section 1 of the chapter explaining this code,
which can be downloaded from http://fivedots.coe.psu.ac.th/~ad/jg/ch165/


---------------------------------
Compilation of the Example: 

$ compile *.java
    // you should have installed all the libraries, and check their locations
       match the paths used in compile.bat 

---------------------------------
Execution of the Example: 

$ run BoxNyAR
    // you should have installed all the libraries, and check their locations
       match the paths used in run.bat 

   // you need a print out of the Hiro marker; 
       there's a PDF file in Data\ that you can print out

---------
Last updated: 24th July 2013